<include file="public@header"/>
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:url('ceping/index')}">所有测评任务</a></li>
        <li><a href="{:url('ceping/add')}">添加测评任务</a></li>
        <li class="active"><a>编辑测评任务</a></li>
    </ul>
    <form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('ceping/editPost')}">
        <div class="form-group">
            <label for="input-product_name" class="col-sm-2 control-label">任务名称<span class="form-required">*</span></label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" id="input-product_name" name="product_name" value="{$ceping.product_name}">
            </div>
        </div>

        <div class="form-group">
            <label for="input-commission" class="col-sm-2 control-label">任务佣金<span class="form-required">*</span></label>
            <div class="col-md-6 col-sm-10">
                <input type="text" value="{$ceping.commission}" class="form-control" id="input-commission" name="commission">
            </div>
        </div>
        <div class="form-group">
            <label for="input-commission_type" class="col-sm-2 control-label">佣金单位<span class="form-required">*</span></label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" value="{$ceping.commission_type}" placeholder="请输入$/￥等" id="input-commission_type" name="commission_type">
            </div>
        </div>

        <div class="form-group">
            <label for="input-category" class="col-sm-2 control-label">所属分类<span class="form-required">*</span></label>
            <div class="col-md-6 col-sm-10">
                <select class="form-control" name="category_id" id="input-category">
                    <volist name="categories" id="v">
                        <option {$ceping['category_id']== $v.id ?'selected':''} value="{$v.id}">{$v.name}</option>
                    </volist>
                </select>
            </div>
        </div>

        <div class="form-group">
            <label for="input-product_image" class="col-sm-2 control-label">产品图片<span class="form-required">*</span></label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" id="input-product_image" name="product_image" value="{$ceping.product_image}">
                <a href="javascript:uploadOneImage('图片上传','#input-product_image');">上传图片</a>
            </div>
        </div>

        <div class="form-group">
            <label for="input-product_link" class="col-sm-2 control-label">产品链接<span class="form-required">*</span></label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" id="input-product_link" name="product_link" value="{$ceping.product_link}">
            </div>
        </div>

        <div class="form-group">
            <label for="input-shop_name" class="col-sm-2 control-label">所属店铺<span class="form-required">*</span></label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" id="input-shop_name" name="shop_name" value="{$ceping.shop_name}">
            </div>
        </div>

        <div class="form-group">
            <label for="input-shop_image" class="col-sm-2 control-label">店铺截图<span class="form-required">*</span></label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" id="input-shop_image" name="shop_image" value="{$ceping.shop_image}">
                <a href="javascript:uploadOneImage('图片上传','#input-shop_image');">上传图片</a>
            </div>
        </div>

        <div class="form-group">
            <label for="input-num" class="col-sm-2 control-label">测评数量<span class="form-required">*</span></label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" id="input-num" name="need_num" value="{$ceping.need_num}">
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">状态<span class="form-required">*</span></label>
            <div class="col-md-6 col-sm-10">
                <label for="status-able">
                    <input {$ceping.status?'checked':''} class="form-control" id="status-able" type="radio" name="status" value="1">可用</label>
                <label style="margin-left: 15px" for="status-dis">
                    <input {$ceping.status?'':'checked'} class="form-control" id="status-dis" type="radio" name="status" value="0">禁用</label>
            </div>
        </div>

        <div class="form-group">
            <label for="input-ceping_description" class="col-sm-2 control-label">备注</label>
            <div class="col-md-6 col-sm-10">
                <textarea class="form-control" name="remark"
                          id="input-ceping_description">{$ceping.remark}</textarea>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <input type="hidden" name="id" value="{$ceping.id}">
                <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
                <a class="btn btn-default" href="{:url('ceping/index')}">{:lang('BACK')}</a>
            </div>
        </div>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>
